stylecontext: Stop animations on manual invalidation
authorBenjamin Otte <otte@redhat.com>
Sat, 10 Jan 2015 12:58:39 +0000 (13:58 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 10 Jan 2015 13:25:40 +0000 (14:25 +0100)
If a gtk_style_context_invalidate() is called on a widget's style
context (which nobody should ever do, sheesh!) and we're animating, stop
the animations.

Fixes crashers in Nautilus.

gtk/gtkstylecontext.c

index 4e91e843ee3408dbcbcabe822ac4bd384106bbb2..25385f0b23fa608129351729333ab1ab6cf37e06 100644 (file)
@@ -3072,6 +3072,9 @@ gtk_style_context_invalidate (GtkStyleContext *context)
   gtk_css_node_set_values (context->priv->cssnode, style);
   g_object_unref (style);
 
+  if (!gtk_style_context_is_saved (context))
+    _gtk_style_context_update_animating (context);
+
   changes = _gtk_bitmask_new ();
   changes = _gtk_bitmask_invert_range (changes,
                                        0,